/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.nms.entities;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author mohamedemara
 */
@Entity
@Table(name = "ACCOUNTDAILY")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Accountdaily.findAll", query = "SELECT a FROM Accountdaily a"),
    @NamedQuery(name = "Accountdaily.findByLineNo", query = "SELECT a FROM Accountdaily a WHERE a.lineNo = :lineNo"),
    @NamedQuery(name = "Accountdaily.findByOperationNo", query = "SELECT a FROM Accountdaily a WHERE a.operationNo = :operationNo"),
    @NamedQuery(name = "Accountdaily.findByCustomerId", query = "SELECT a FROM Accountdaily a WHERE a.customerId = :customerId"),
    @NamedQuery(name = "Accountdaily.findByOperationDate", query = "SELECT a FROM Accountdaily a WHERE a.operationDate = :operationDate"),
    @NamedQuery(name = "Accountdaily.findByPaid", query = "SELECT a FROM Accountdaily a WHERE a.paid = :paid"),
    @NamedQuery(name = "Accountdaily.findByRest", query = "SELECT a FROM Accountdaily a WHERE a.rest = :rest"),
    @NamedQuery(name = "Accountdaily.findByFlag", query = "SELECT a FROM Accountdaily a WHERE a.flag = :flag")})
public class Accountdaily implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "line_no")
    private Integer lineNo;
    @Basic(optional = false)
    @NotNull
    @Column(name = "operation_no")
    private int operationNo;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 10)
    @Column(name = "customer_id")
    private String customerId;
    @Column(name = "operation_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date operationDate;
    @Basic(optional = false)
    @NotNull
    @Column(name = "paid")
    private int paid;
    @Basic(optional = false)
    @NotNull
    @Column(name = "rest")
    private int rest;
    @Column(name = "flag")
    private Integer flag;

    public Accountdaily() {
    }

    public Accountdaily(Integer lineNo) {
        this.lineNo = lineNo;
    }

    public Accountdaily(Integer lineNo, int operationNo, String customerId, int paid, int rest) {
        this.lineNo = lineNo;
        this.operationNo = operationNo;
        this.customerId = customerId;
        this.paid = paid;
        this.rest = rest;
    }

    public Integer getLineNo() {
        return lineNo;
    }

    public void setLineNo(Integer lineNo) {
        this.lineNo = lineNo;
    }

    public int getOperationNo() {
        return operationNo;
    }

    public void setOperationNo(int operationNo) {
        this.operationNo = operationNo;
    }

    public String getCustomerId() {
        return customerId;
    }

    public void setCustomerId(String customerId) {
        this.customerId = customerId;
    }

    public Date getOperationDate() {
        return operationDate;
    }

    public void setOperationDate(Date operationDate) {
        this.operationDate = operationDate;
    }

    public int getPaid() {
        return paid;
    }

    public void setPaid(int paid) {
        this.paid = paid;
    }

    public int getRest() {
        return rest;
    }

    public void setRest(int rest) {
        this.rest = rest;
    }

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (lineNo != null ? lineNo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Accountdaily)) {
            return false;
        }
        Accountdaily other = (Accountdaily) object;
        if ((this.lineNo == null && other.lineNo != null) || (this.lineNo != null && !this.lineNo.equals(other.lineNo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.nms.entities.Accountdaily[ lineNo=" + lineNo + " ]";
    }
    
}
